You can permanently delete iMIS customer records using two different methods:
■ Permanently delete individual records (select the record in Manage Customers and click Delete) or
■ Mark the record for deletion to be deleted at a later time by selecting the record in Manage Customers and changing the status to Marked for deletion. This will mark the record in the database with a status of D. You must then run the appropriate script for your database to permanently remove these customer records.
iMIS does the following when you run a script to permanently delete customer records marked with a status of D:
■ A record is added to the Name_Log table. The record will have the following values: Date/Time,CHANGE,DELETE,GUEST,id,last_first,company
■ The Activity table is updated. For every customer record that is deleted, all of that customer's activity records will have the ID set to ''.
■ All references to deleted customers are removed from user-defined tables.
■ All records for deleted customers are removed from the following tables:
□ Name
□ Name_Address
□ Name_Fin
□ Name_Note
□ Name_Picture
□ Name_Indexes
□ Name_Security
□ Name_Security_Groups
□ Prospect
□ Subscriptions
There are certain cases when the customer record will not be deleted:
■ The customer has open orders. The script checks for the following field values in the Orders table:
ID = ID to be deleted and
STAGE <> "CLOSED" and STAGE <> "CANCELLED" and
STAGE <> "COMPLETED"
■ The customer has an outstanding invoice balance. The script checks for the following field values in the Invoice table:
BT_ID = ID to be deleted and BALANCE <> 0
■ The customer has active subscriptions. The script checks for the following field values in the Subscriptions table:
STATUS LIKE 'A%'
■ The customer has an entry in the Referral module, and this customer owes money. The script checks for the following values in the Referral table:
PROVIDER_ID = ID to be deleted and
REFERRAL_FEE > 0 and READY_TO_INVOICE = 1 and ORDER_NUMBER = 0
■ Deleting this customer will leave orphaned records. Examples of orphaned records include the following:
□ Name record with a Bill_TO ID, where the Bill_To ID no longer exists.
□ Name record with a Company_ID, where the Company_ID no longer exists.
□ Name_Fin record, where the Bill_To ID no longer exists.
□ Cert_Register records, where the Bill_To ID no longer exists.
For example, if ID 110 and 200 both have Cert_Register records with 110 as the Bill To Id, and ID is marked for deletion, and ID 200 isn't, ID 110 won't be deleted since that would leave ID 200 with a non-existent Bill To ID.
To permanently delete a customer record (SQL database)
Use the following instructions to permanently delete a customer record that has been marked for deletion (records in the database with a status of D). You can also run the Purge_MSSQL7.zip file available in the Tech Support Download area of the ASI website.
Note: This procedure will only delete entries from Client Server tables. To remove entries from .NET tables, you need to use the DB Maintenance tool. See Purging user and contact records.
1. Select Utilities> Reports and Queries to open the System Reports and Queries window.
2. Select the Purge report type.
3. Select the Membership Purge for MS SQL report for you database.
4. Click Run. A message displays asking you to confirm the deletion.
5. Click Yes.